local RotateFightCamera = class("RotateFightCamera")
local Vector3 = require("utils.Vector3")
-- 调整战斗相机视角

function RotateFightCamera:start()
end

-- function RotateFightCamera:update()
--     if G_Input.GetMouseButton(0) then
--         local originalPosition = self.transform.position
--         local originalRotation = self.transform.rotation
--         local axisX = G_Input.GetAxis("Mouse X")
--         local axisY = G_Input.GetAxis("Mouse Y")
--         local center = self.CenterPoint.transform.position
--         if math.abs(axisX) > math.abs(axisY) then
--             local rotate = axisX * 10
--             self.transform:RotateAround(center, Vector3.up, rotate)
--         elseif math.abs(axisX) < math.abs(axisY) then
--             local rotate = axisY * 10
--             local pos = self.transform.localToWorldMatrix:MultiplyPoint(Vector3.new(-1, 0, 0))
--             local dir = pos - self.transform.position
--             self.transform:RotateAround(center, dir.normalized, rotate)
--         end
--         local x = self.transform.eulerAngles.x --//读取Rotation的x值
--         if x < 5 or x > 70 then
--             self.transform.position = originalPosition
--             self.transform.rotation = originalRotation
--         end
--     end
-- end

return RotateFightCamera
